WRITE MEMBLOCK

Write the specified memblock to a file open for writing.

  Syntax
WRITE MEMBLOCK File Number, Memblock Number
  Parameters
File Number
Integer
The open file number
Memblock Number
Integer
Write the specified memblock to a file open for writing

  Returns

This command does not return a value.

  Description

You can store multiple memblocks within a currently open file, and is useful for creating your own file formats. To retrieve the memblock you must use the READ MEMBLOCK command. You must specify the file and memblock numbers using integer values.

  Example Code
cls
open to write 1,"data.dat"
if file open(1)=1
write memblock 1,1
endif
close file 1
wait 1000*8
open to read 1,"data.dat"
if file open(1)=1
read memblock 1,1
endif
close file 1
do
loop
end
  See also

FILE Commands Menu
Index